package com.guan.study.poi;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.alibaba.excel.metadata.data.WriteCellData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.net.URL;


/**
 * @Date: 2023/7/21 14:27
 * @Author: yaobai
 * @Description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="UserVo对象", description="用户")
//内容样式
@ContentStyle(
        horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderTop = BorderStyleEnum.THIN,
        borderBottom = BorderStyleEnum.THIN,
        borderLeft = BorderStyleEnum.THIN,
        borderRight = BorderStyleEnum.THIN)
//表头行高
@HeadRowHeight(30)
//内容单元格行高
@ContentRowHeight(25)
public class UserVo {

    @ExcelIgnore
    @ApiModelProperty("主键id")
    private String id;

    @ExcelProperty("用户id")
    @ApiModelProperty("用户id")
    @ColumnWidth(20)
    private String uid;

    @ExcelProperty("姓名")
    @ApiModelProperty("姓名")
    @ColumnWidth(20)
    private String name;

    @ExcelProperty("年龄")
    @ApiModelProperty("年龄")
    @ColumnWidth(20)
    private Integer age;

    @ExcelProperty(value = "头像")
    @ApiModelProperty("头像")
    @ColumnWidth(20)
    private String headUrl;


}
